
import 'package:amway_superapp_creator_plugin/analysis/zhuge_identify.dart';
import 'package:amway_superapp_creator_plugin/utils/sp_util.dart';
import 'package:zhugeio/zhugeio.dart';

class ZhugePortalAnalysis {

  ///页面加载完成
  static portalCreatorPage(bool isEdited){
    Zhugeio.track("SuperAPP_创玩小站页", {
      "事件类型": "页面浏览",
      "页面类别": "创玩小站",
      "访客类别": "",//ABO/PC/FOA/PFOA/BFOA/Visitor
      "页面详情": isEdited ? "已编辑" : "未编辑"
    });
  }

  ///页面加载完成
  static userguideListPage(bool isEdited) {
    SpUtil.getData(amwayAccesstypeKey).then((customerType) {
      Zhugeio.track("SuperAPP_创玩小站使用指南列表页", {
        "事件类型": "页面浏览",
        "页面类别": "创玩小站",
        "访客类别": customerType, //ABO/PC/FOA/PFOA/BFOA/Visitor
        "页面详情": isEdited ? "已编辑" : "未编辑"
      });
    });

  }

    ///点击
    static creatorClickTab(String tabType, String title){
      Zhugeio.track("SuperAPP_创玩小站页_点击设置Tab", {
        "事件类型": "点击事件",
        "事件详情": "无",
        "Tab名称": tabType,//<编辑资料/设置小站/修改颜色>
        "行为类型": "点击",
        "行为对象": "按钮",
        "页面名称": title //<页面title>
      });
  }

  static creatorClickToShop(String title){
    Zhugeio.track("SuperAPP_创玩小站页_点击进入小店", {
      "事件类型": "点击事件",
      "事件详情": "无",
      "行为类型": "点击",
      "行为对象": "按钮",
      "页面名称": title //<页面title>
    });
  }

  static creatorClickShareShop(String title){
    Zhugeio.track("SuperAPP_创玩小站页_点击分享小店", {
      "事件类型": "点击事件",
      "事件详情": "无",
      "行为类型": "点击",
      "行为对象": "按钮",
      "页面名称": title //<页面title>
    });
  }

  static creatorClickMore(String title){
    Zhugeio.track("SuperAPP_创玩小站页_点击更多", {
      "事件类型": "点击事件",
      "事件详情": "无",
      "行为类型": "点击",
      "行为对象": "按钮",
      "页面名称": title //<页面title>
    });
  }



}